﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="webapi_edit.aspx.cs" Inherits="EDP.Application.Web.WebApi.webapi_edit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('panel_grid_version_List_ctl00_btn_query');
                __doPostBack('panel$grid_version_List$ctl00$btn_query', '');
            }
        }
    </script>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:Panel ID="panel" runat="server" ShowBorder="false" Margin="10" Layout="Region">
            <Items>
                <f:SimpleForm ID="from" runat="server" Title="接口基本信息" RegionPosition="Left" Width="360" BoxFlex="1" BodyPadding="10" Margin="0" LabelWidth="75" Layout="Column">
                    <Items>
                        <f:TextBox ID="tb_name" runat="server" Label="接口名称" BindName="Name" Margin="0" ColumnWidth="100%" ShowRedStar="true" />
                        <f:TextBox ID="TextBox1" runat="server" Label="接口编号" BindName="Numbers" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:DropDownList ID="ddl_classifyList" runat="server" Label="所属分类" BindName="ClassifyId" EnableSimulateTree="true" Margin="10 0 0 0" ColumnWidth="100%" />

                        <f:CheckBox ID="CheckBox1" runat="server" Label="登录访问" BindName="IsLoginAccess" Margin="10 0 0 0" ColumnWidth="50%" Checked="true" />
                        <f:CheckBox ID="CheckBox2" runat="server" Label="授权访问" BindName="IsAuthenticationAccess" Margin="10 0 0 10" ColumnWidth="50%" Checked="true" />

                        <f:NumberBox ID="tb_sort" runat="server" Label="排序号" BindName="SortNumber" Margin="10 0 0 0" ColumnWidth="100%" MaxLength="4" Text="0" />
                        <f:TextBox ID="tb_createUser" runat="server" Label="创建人" BindName="CreateUserName" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_craeteTime" runat="server" Label="创建时间" BindName="CreateTimeDisplay" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_modifyUser" runat="server" Label="修改人" BindName="ModifyUserName" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextBox ID="tb_modifyTime" runat="server" Label="修改时间" BindName="ModifyTimeDisplay" Margin="10 0 0 0" ColumnWidth="100%" Readonly="true" />
                        <f:TextArea ID="tb_remark" runat="server" Label="描述" BindName="Remarks" Margin="10 0 0 0" ColumnWidth="100%" Height="180" />
                    </Items>
                    <Toolbars>
                        <f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
                            <Items>
                                <f:Button ID="btn_save" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 10 0" OnClick="btn_save_Click" />
                                <f:Button ID="btn_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" EnablePostBack="false" EnablePermission="false" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                </f:SimpleForm>
                <f:Grid ID="grid_version_List" runat="server" Title="接口版本信息" Margin="0 0 0 5" RegionPosition="Center" DataKeyNames="ID" SortField="VersionNumber" SortDirection="desc" EnableCheckBoxSelect="false"
                    OnPreRowDataBound="grid_version_List_PreRowDataBound" OnPageIndexChange="grid_version_List_PageIndexChange" OnSort="grid_version_List_Sort" OnRowCommand="grid_version_List_RowCommand">
                    <Toolbars>
                        <f:Toolbar runat="server" Position="Top" ToolbarAlign="Right" QueryToolbar="true">
                            <Items>
                                <f:TextBox ID="tb_version" runat="server" Margin="0" Width="100" QueryName="Version" EmptyText="版本" />
                                <f:TextBox ID="tb_key" runat="server" Margin="0 0 0 10" Width="240" QueryName="AssemblyKeyword" EmptyText="程序集/类名/方法名" />
                                <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" EnablePermission="false" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_add" runat="server" Text="新增接口版本" Icon="Add" Margin="0 10 0 0" OnClick="btn_add_Click" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="Version" Width="80" SortField="VersionNumber" HeaderText="版本" />
                        <f:BoundField DataField="AssemblyName" Width="150" SortField="AssemblyName" HeaderText="程序集" />
                        <f:BoundField DataField="ClassName" ExpandUnusedSpace="true" HeaderText="接口类" DataToolTipField="ClassName" />
                        <f:BoundField DataField="MethodName" ExpandUnusedSpace="true" HeaderText="接口方法" DataToolTipField="MethodName" />
                        <f:BoundField DataField="CreateUserName" Width="80" HeaderText="创建人" />
                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                        <f:BoundField DataField="ModifyTime" Width="140" HeaderText="修改时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_enable" Width="75" CommandName="enable" EnableLock="true" HeaderText="启用状态" CommandTitle="设置接口版本启用状态" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_edit" Width="30" CommandName="edit" EnableLock="true" CommandTitle="编辑" Icon="TableEdit" ToolTip="编辑" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" EnableLock="true" CommandTitle="删除" Icon="Delete" ToolTip="删除"
                            ConfirmTitle="删除WebAPI接口版本" ConfirmText="是否删除该WebAPI接口版本？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
        <f:Window ID="win_edit" runat="server" OnClose="win_edit_Close" />
    </form>
</body>
</html>
